/* ------------------------------------------ main.js入口 ------------------------------------------ */

import Vue from "vue";
import App from "./views/App.vue";
import router from "./routers";
import store from "./stores";
// import echarts from "echarts";
import * as echarts from 'echarts'
import '@/assets/font/shuheitifont.css'
// window全局对象挂载
import globalCode from "@/assets/global/globalCode";
import globalConfig from "@/assets/global/globalConfig";
import '@/assets/global/vant'
import utils from "@/utils";
import dayjs from 'dayjs';
import VConsole from "vconsole";
import { Uploader } from 'vant';
import { DropdownMenu, DropdownItem ,Area} from 'vant';

Vue.use(Area);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Uploader);
window.globalCode = globalCode;
window.globalConfig = globalConfig;
window.utils = utils;

// plugin引入
import "@/plugins";
// 1 === 1 && new VConsole();
if (process.env.NODE_ENV === 'development') {
  // new VConsole();
}
// filter注入
import filters from "@/filters";
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});
//使用echarts
Vue.prototype.$echarts = echarts;
Vue.prototype.$dayjs = dayjs;
// 关闭生产模式下给出的提示
Vue.config.productionTip = false;

// 实例化根vue对象
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
